﻿using ACC.Extensions.Utilities;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ACC.Extensions.ClientBusiness
{
    public class UserAuthenticate
    {
        //public AccResult UserValidate(string strUser)
        //{
        //    AccResult accRes = new AccResult();
        //    string strSql = string.Format("SELECT 1 FROM [ACC_OPERATOR] WHERE [OPERATORID] ='{0}' AND [STATUS] =1", strUser);
        //    DataTable dt = SqlHelper.GetDataTable(strSql);
        //    if (dt.Rows.Count == 0)
        //    {
        //        accRes.Result = false;
        //        accRes.Message = string.Format("用户 {0}，不存在或者被禁用", strUser);
        //    }
        //    else
        //    {
        //        accRes.Result = true;
        //        accRes.Message = string.Format("用户 {0}，登陆成功", strUser);
        //    }
        //    return accRes;
        //}
        //public AccResult UserValidate(string strUser, string strPassword)
        //{
        //    AccResult accRes = new AccResult();
        //    string strSql = string.Format("SELECT 1 FROM [ACC_USER] WHERE [USERNAME] ='{0}' AND [PASSWORD] ='{1}'", strUser, strPassword);
        //    DataTable dt = SqlHelper.GetDataTable(strSql);
        //    if (dt.Rows.Count == 0)
        //    {
        //        accRes.Result = false;
        //        accRes.Message = string.Format("用户 {0}，不存在或者被禁用", strUser);
        //    }
        //    else
        //    {
        //        accRes.Result = true;
        //        accRes.Message = string.Format("用户 {0}，登陆成功", strUser);
        //    }
        //    return accRes;
        //}
    }
}
